<template>
  <div class="toast-pop-box" :class="{show:value||isShow}">
    hello
  </div>
</template>

<script>
export default {
  data(){
    return{
      isShow:false
    }
  },
  props:{
    value:{
      type: Boolean,
      default: false
    }
  }
}
</script>

<style lang="less" scoped>
.toast-pop-box{
  width: 100px;
  height: 100px;
  color: #fff;
  text-align: center;
  line-height: 100px;
  background-color: rgba(0, 0, 0, .6);
  opacity: 0;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: all .3s;
}
.show{
  opacity: 1;
}
</style>